package own.stu.jobgib.playown.juc;

import org.openjdk.jol.info.ClassLayout;

public class ObjectInfo {

    public static void main(String[] args) {
        Object dog = new Object();
        System.out.println("初始信息:" + ClassLayout.parseInstance(dog).toPrintable());
        System.out.println(dog.hashCode());
        System.out.println("hashcode信息:" + ClassLayout.parseInstance(dog).toPrintable());
        synchronized (dog) {
            System.out.println("加锁后信息:" + ClassLayout.parseInstance(dog).toPrintable());
        }
        System.out.println("释放锁后信息:" + ClassLayout.parseInstance(dog).toPrintable());
    }
}
